#include <bits/stdc++.h>

using namespace std;

int main()
{
    long long x;
    cin >> x;
    double tmp = sqrt(x);
    if ((int)tmp - tmp == 0)cout << x;
    else
    {
        long long pre = pow((int)tmp, 2);
        long long next = pow((int)tmp + 1, 2);
        if (abs(pre - x) > abs(next - x))
        {
            cout << next << endl;
        }
        else cout << pre << endl;
    }
    return 0;
}